﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;

namespace Entity.shangping
{
    /// <summary>
    /// 商品类
    /// </summary>
    [Table("t_shop_goods")]
    public class Goods
    {
        /// <summary>
        /// 商品ID
        /// </summary>
        [Key]
        public string ID { get; set; }

        /// <summary>
        /// 商品名称
        /// </summary>

        public string Name { get; set; }

        /// <summary>
        /// 价格（decimal实数类型，double小数类型）
        /// </summary>
        public decimal Price { get; set; }

        /// <summary>
        /// 图片链接
        /// </summary>
        public string Url { get; set; }

        /// <summary>
        /// 库存数量
        /// </summary>
        public int Num { get; set; }

        /// <summary>
        /// 商品详情
        /// </summary>
        public string Details { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 下家10下架，9表示上架
        /// </summary>

        public int Status { get; set; }

        /// <summary>
        /// 状态描述
        /// </summary>
        public string StatusDesc
        {
            get
            {
                if (Status == 9)
                {
                    return "已上架";
                }
                else if (Status == 10)
                {
                    return "已下架";
                }
                else
                {
                    return "";
                }

            }
        }

        /// <summary>
        /// 商品分类ID
        /// </summary>
        public string GoodsTypeID { get; set; }

    }
}
